﻿@using System.Data
@using ZoomLa.BLL
@using ZoomLa.Model
@using ZoomLa.Common
@model ZoomLa.SQLDAL.SQL.PageSetting
@{ 
    Model.cols = 5;
}
@functions{
    public string GetClass(int classid)
    {
        B_Exam_Class bec = new B_Exam_Class();
        M_Exam_Class mec = bec.GetSelect(classid);
        if (mec != null && mec.C_id > 0)
        {
            return mec.C_ClassName;
        }
        else
        {
            return "";
        }
    }
}
<table id="EGV" class="table table-striped table-bordered table-hover">
    @if (Model.itemCount > 0)
    {
        <tr>
            <th></th><th>试题标题</th><th>类别</th><th>题目类型</th><th>题型</th>
        </tr>
        foreach (DataRow dr in Model.dt.Rows)
        {
            <tr>
                <td><input type="checkbox" name="idchk" value="@dr["p_id"]" /></td>
                <td>@dr["p_title"]</td>
                <td>@GetClass(DataConverter.CLng(dr["p_Class"]))</td>
                <td>
                    @(DataConverter.CLng(dr["p_type"]) == 10 ? "大题":"小题")
                </td>
                <td>
                    @M_Exam_Sys_Questions.GetTypeStr(DataConverter.CLng(dr["p_Type"]))
                </td>
            </tr>
        }
    }
    else
    {
        <tr><td colspan="5">当前没有数据</td></tr>
    }
    @Html.Partial("_page", Model)
</table>
